package com.dso.portal.entity.site;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.dso.portal.entity.common.Location;

@Entity(name="Navigation")
@Table(name="Navigation",schema="DSO")
public class Navigation {
	
	@Id
	@GeneratedValue
	@Column(name="id")
	private Integer id;
	
	@Column(name="name",length=32)
	private String name;
	
	@Column(name="name",length=150)
	private String target;
	
	@Column(name="isBlank",length=1)
	private Boolean isBlank;
	
	@Column(name="isVisiable",length=1)
	private Boolean isVisiable;
	
	@Column(name="isMedia",length=1)
	private Boolean isMedia;
	
	@Column(name="mediaPath",length=150)
	private String mediaPath;
	
	@Column(name="orderNumber",length=2)
	private Integer orderNumber;
	
	@Column(name="description",length=200)
	private String description;
	
	@OneToMany(cascade=CascadeType.REFRESH)
	@JoinColumn(name="parent_id",nullable=true)
	private Navigation parent;
	
	@Column(name="location",nullable=false,length=10)
	@Enumerated(EnumType.STRING)
	private Location location;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public Boolean getIsBlank() {
		return isBlank;
	}

	public void setIsBlank(Boolean isBlank) {
		this.isBlank = isBlank;
	}

	public Boolean getIsVisiable() {
		return isVisiable;
	}

	public void setIsVisiable(Boolean isVisiable) {
		this.isVisiable = isVisiable;
	}

	public Boolean getIsMedia() {
		return isMedia;
	}

	public void setIsMedia(Boolean isMedia) {
		this.isMedia = isMedia;
	}

	public String getMediaPath() {
		return mediaPath;
	}

	public void setMediaPath(String mediaPath) {
		this.mediaPath = mediaPath;
	}

	public Integer getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(Integer orderNumber) {
		this.orderNumber = orderNumber;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Navigation getParent() {
		return parent;
	}

	public void setParent(Navigation parent) {
		this.parent = parent;
	}
	
	public Location getLocation() {
		return location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}



	
	
}
